%h1.song Upload a New Song
%table.song
  - form_for @song, songs_url, :method => :put, :html => {:multipart => true} do |form|
    %tr.field_title
      %td.field_title{:colspan => "3"}
        = error_messages_for     :song
    %tr
      %td.field_title File:
      %td.file_field= form.file_field   :uploaded_data
    %tr
      %td.field_title Name:
      %td.field= form.text_field        :name
      %td.error= error_message_on       :song, :name
    %tr
      %td.field_title Track:
      %td.field= form.text_field        :track
      %td.error= error_message_on       :song, :track
    %tr
      %td.field_title Lyrics:
      %td.area= form.text_area          :lyrics
      %td.error= error_message_on       :song, :lyrics
    %tr
      %td.field_title Purchase Link:
      %td.field= form.text_field        :purchase_link
      %td.error= error_message_on       :song, :purchase_link
    %tr
      %td.field_title Album:
      %td.select_field 
        %select{:name => "song[album_id]"}
          %option{:value => ''}none
          - @albums.each do |album|
            %option{:value => album.id}= album.name
        or create a
        %a{:href => new_album_url, :title => "Create a new Album", :alt => "Create a new album"}new one
    %tr
      %td.submit= submit_tag 'Upload'